﻿/**
 * ...
 * @author waneck
 */

package asc.net;

extern class ProxyStream 
{

	
	public function new(connection:NetConnection):Void;
	
	/**
	 * Called every time a status change or error occurs in a ProxyStream object.
	 * 
	 * @see	asc.enums.ProxyStreamStatus
	 */
	dynamic function onStatus(infoObject: { code:String, level:String } ):Void;
	
	/**
	 * Proxies a stream from one Flash Media Server to another over a NetConnection. The stream can be live, recorded, or both.
	 * 
	 * @param	local	A string specifying a local stream name. 
	 * @param	remote	A string specifying a remote stream name.
	 */
	function proxyFrom(local:String, remote:String):Void;
	
	/**
	 * Stops proxying a stream.
	 */
	function stop():Void;
}